{% extends 'basic_app/master.html' %}
{#{% block tag_left %}#}
{#    {% include 'oratk_app/tag_left_user.html' %}#}
{#{% endblock %}#}
{% block title %}
    <title>{{ select_name }}</title>
{% endblock %}
{% block tag_left %}
    <h3>&nbsp数据库信息</h3>
    <h5>&emsp;&emsp;dbname : {{ dbname }}</h5>
    <h5>&emsp;&emsp;conn_str : {{ conn_string }}</h5>
    <h3>&nbsp查询项</h3>
    <h5>&emsp;&emsp;{{ select_name }} </h5>
    <h3>&nbsp查询结果为:</h3>
{% endblock %}
{% block userinfo %}
    <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
        <ul class="nav nav-tabs">
            {% for i in return_list %}
                {% if i.menu_num == 0 %}
                    <li class="active"><a data-toggle="tab" href="#{{ i.menu_name }}">{{ i.menu_name }}</a></li>
                {% else %}
                    <li><a data-toggle="tab" href="#{{ i.menu_name }}">{{ i.menu_name }}</a></li>
                {% endif %}
            {% endfor %}
        </ul>

        <div class="tab-content">
            {% for i in return_list %}
                {% if i.menu_num == 0 %}
                    <div id="{{ i.menu_name }}" class="tab-pane fade in action in active">
                {% else %}
                    <div id="{{ i.menu_name }}" class="tab-pane fade in action">
                {% endif %}
            <div>&nbsp</div>
            {% for ii in i.menu_val %}
                <table class="table table-striped table-bordered table-hover column" id="tab_id_{{ i.menu_name }}">
                    <span style="color:red;">{{ ii.desc }}</span>
                    <thead>
                    <tr>
                        {% for col_name in ii.columns %}
                            <th>{{ col_name }}</th>
                        {% endfor %}
                    </tr>
                    </thead>
                    <tbody>
                    {% for result in ii.result %}
                        <tr>
                            {% for col_value in result %}
                                {#                                        <td><pre  style="display:inline;  border: none">{{ col_value }}</pre></td>#}
                                <td>
                                    {#                                <pre style="display:inline-table; border: none">{{ col_value }}</pre>#}
                                    <pre style="border: none;padding: 0;margin: 0;background: none;"> {{ col_value }}</pre>
                                </td>
                            {% endfor %}
                        </tr>
                    {% endfor %}
                    </tbody>
                </table>
            {% endfor %}
            </div>
            {% endfor %}
            </div>
        </div>
    </div>
{% endblock %}

